#include <kutils.h>
#include "display.h"
#include "isa.h"
#include "hardware_detection.h"

void isa_scan()
{
#ifdef FLUIDIUM_DEBUG
	write_string("ISA: Begin scan...\n\n");
#endif
	//Floppy Controller
	hw_add_device(HW_BUS_TYPE_ISA, HW_DONT_CARE, HW_DONT_CARE, 
						HW_CLASS_MASS_STORAGE, HW_SUBCLASS_FLOPPY, 
						HW_DONT_CARE, HW_DONT_CARE, HW_DONT_CARE, 6);

	//IDE
	hw_add_device(HW_BUS_TYPE_ISA, HW_DONT_CARE, HW_DONT_CARE, 
						HW_CLASS_MASS_STORAGE, HW_SUBCLASS_IDE, 
						HW_DONT_CARE, HW_DONT_CARE, HW_DONT_CARE, 14);

	//Keyboard
	hw_add_device(HW_BUS_TYPE_ISA, HW_DONT_CARE, HW_DONT_CARE, 
						HW_CLASS_INPUT, HW_SUBCLASS_KEYBOARD, 
						HW_DONT_CARE, HW_DONT_CARE, HW_DONT_CARE, 1);

	//Mouse
	hw_add_device(HW_BUS_TYPE_ISA, HW_DONT_CARE, HW_DONT_CARE, 
						HW_CLASS_INPUT, HW_SUBCLASS_MOUSE, 
						HW_DONT_CARE, HW_DONT_CARE, HW_DONT_CARE, 12);

	//TODO: PIT, RTC, PC Speaker

#ifdef FLUIDIUM_DEBUG
	write_string("ISA: Scan complete.\n");
#endif
}


